﻿using System.Windows;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Unity;
using System;

namespace Core
{
    /// <summary>
    /// Extracts methods of UnityBootstrapper class
    /// </summary>
    public interface IConfig
    {
        /// <summary>
        /// Main view reference
        /// </summary>
        ShellView ShellView { get; set; }

        /// <summary>
        /// Reference to unity container
        /// </summary>
        //IUnityContainer UnityContainer { get; set; }
        
        /// <summary>
        /// Sets the screen manager up
        /// </summary>
        void RegisterScreenManeger(IUnityContainer container);


        /// <summary>
        /// Returns container instance
        /// </summary>
        /// <returns>IUnityContainer</returns>
        IUnityContainer CreateUnityContainer();

        /// <summary>
        /// Registers theme laoder in IoC container
        /// </summary>
        /// <param name="container"></param>
        void RegisterThemeLoaders(IUnityContainer container);

        /// <summary>
        /// Registers services in IoC container
        /// </summary>
        void RegisterServices(IUnityContainer container);

        /// <summary>
        /// Returns modules catalog loaded from xaml
        /// </summary>
        /// <param name="uri"></param>
        /// <returns></returns>
        IModuleCatalog CreateModuleCatalog(string uri);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="uri"></param>
        /// <returns></returns>

        /// <summary>
        /// Initializes application resources, registers services in IoC container
        /// </summary>
        void Initialize(IUnityContainer container);

        /// <summary>
        /// creates shell using IoC container and sets app root visual
        /// </summary>
        /// <returns>
        /// DependencyObject - ShellView
        /// </returns>
        DependencyObject CreateAndSetRootVisual(IUnityContainer container);

        /// <summary>
        /// Initializes ShellViewModel and binds it to DataContext of ShellView
        /// </summary>
        /// <param name="container">Reference to unity container</param>
        void SetupShellViewModel(IUnityContainer container);
    }
}
